<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org">
<head>
    <th:block th:include="include :: header('修改月数据信息')"/>
    <th:block th:include="include :: datetimepicker-css"/>
    <th:block th:include="include :: select2-css"/>
    <th:block th:include="include :: bootstrap-select-css"/>
</head>
<style>
    input::-webkit-outer-spin-button, input::-webkit-inner-spin-button {
        -webkit-appearance: none;
    }

    input[type="number"] {
        -moz-appearance: textfield;
    }
</style>
<body>
<div class="wrapper wrapper-content animated fadeInRight ibox-content" id="dv">
    <form class="form-horizontal m" id="form-budget-edit" AUTOCOMPLETE="OFF">
        <input type="hidden" id="id" name="id" th:value="${data.id}">
        <input type="hidden" id="type" name="type" th:value="${type}">
        <h4 class="form-header h4">基本信息</h4>
        <div class="form-group">
            <div class="col-sm-12">
                <div class="col-sm-6">
                    <label class="col-sm-4 control-label">年份：</label>
                    <div class="col-sm-8">
                        <select name="years" id="years" class="form-control noselect2">
                            <option value="">请选择</option>
                            <option th:selected="${data.years==2020}" value="2020">2020</option>
                            <option th:selected="${data.years==2021}" value="2021">2021</option>
                            <option th:selected="${data.years==2022}" value="2022">2022</option>
                            <option th:selected="${data.years==2023}" value="2023">2023</option>
                            <option th:selected="${data.years==2024}" value="2024">2024</option>
                            <option th:selected="${data.years==2025}" value="2025">2025</option>
                        </select>
                    </div>
                </div>
                <div class="col-sm-6">
                    <label class="col-sm-4 control-label">月份：</label>
                    <div class="col-sm-8">
                        <select name="months" id="months" class="form-control noselect2">
                            <option value="">请选择</option>
                            <option th:selected="${data.months==1}" value="1">一月</option>
                            <option th:selected="${data.months==2}" value="2">二月</option>
                            <option th:selected="${data.months==3}" value="3">三月</option>
                            <option th:selected="${data.months==4}" value="4">四月</option>
                            <option th:selected="${data.months==5}" value="5">五月</option>
                            <option th:selected="${data.months==6}" value="6">六月</option>
                            <option th:selected="${data.months==7}" value="7">七月</option>
                            <option th:selected="${data.months==8}" value="8">八月</option>
                            <option th:selected="${data.months==9}" value="9">九月</option>
                            <option th:selected="${data.months==10}" value="10">十月</option>
                            <option th:selected="${data.months==11}" value="11">十一月</option>
                            <option th:selected="${data.months==12}" value="12">十二月</option>
                        </select>
                    </div>
                </div>
            </div>
        </div>
        <div id="unique"></div>
        <input type="hidden" id="lastYearCounts" th:value="${data.lastYearCount}" disabled>
        <input type="hidden" id="monthlyBudgets" th:value="${data.monthlyBudget}" disabled>
        <input type="hidden" id="lyLastYearCounts" th:value="${data.lyLastYearCount}" disabled>
        <input type="hidden" id="lyMonthlyBudgets" th:value="${data.lyMonthlyBudget}" disabled>
        <input type="hidden" id="fzLastYearCounts" th:value="${data.fzLastYearCount}" disabled>
        <input type="hidden" id="fzMonthlyBudgets" th:value="${data.fzMonthlyBudget}" disabled>
        <input type="hidden" id="wyfLastYearCounts" th:value="${data.wyfLastYearCount}" disabled>
        <input type="hidden" id="wyfMonthlyBudgets" th:value="${data.wyfMonthlyBudget}" disabled>
        <input type="hidden" id="qtsrLastYearCounts" th:value="${data.qtsrLastYearCount}" disabled>
        <input type="hidden" id="qtsrMonthlyBudgets" th:value="${data.qtsrMonthlyBudget}" disabled>
        <input type="hidden" id="bdfyLastYearCounts" th:value="${data.bdfyLastYearCount}" disabled>
        <input type="hidden" id="bdfyMonthlyBudgets" th:value="${data.bdfyMonthlyBudget}" disabled>
        <input type="hidden" id="kfsrxjLastYearCounts" th:value="${data.kfsrxjLastYearCount}" disabled>
        <input type="hidden" id="kfsrxjMonthlyBudgets" th:value="${data.kfsrxjMonthlyBudget}" disabled>
        <input type="hidden" id="cysrLastYearCounts" th:value="${data.cysrLastYearCount}" disabled>
        <input type="hidden" id="cysrMonthlyBudgets" th:value="${data.cysrMonthlyBudget}" disabled>
        <input type="hidden" id="czhjLastYearCounts" th:value="${data.czhjLastYearCount}" disabled>
        <input type="hidden" id="czhjMonthlyBudgets" th:value="${data.czhjMonthlyBudget}" disabled>
        <input type="hidden" id="lrLastYearCounts" th:value="${data.lrLastYearCount}" disabled>
        <input type="hidden" id="lrMonthlyBudgets" th:value="${data.lrMonthlyBudget}" disabled>
        <input type="hidden" id="gdfyLastYearCounts" th:value="${data.gdfyLastYearCount}" disabled>
        <input type="hidden" id="gdfyMonthlyBudgets" th:value="${data.gdfyMonthlyBudget}" disabled>
        <input type="hidden" id="rlcbLastYearCounts" th:value="${data.rlcbLastYearCount}" disabled>
        <input type="hidden" id="rlcbMonthlyBudgets" th:value="${data.rlcbMonthlyBudget}" disabled>
        <input type="hidden" id="sdqnhLastYearCounts" th:value="${data.sdqnhLastYearCount}" disabled>
        <input type="hidden" id="sdqnhMonthlyBudgets" th:value="${data.sdqnhMonthlyBudget}" disabled>
    </form>
</div>
<th:block th:include="include :: footer"/>
<th:block th:include="include :: datetimepicker-js"/>
<th:block th:include="include :: select2-js"/>

<script type="text/javascript">
    var prefix = ctx + 'budget';

    $(function () {
        var lastYearCount = $("#lastYearCounts").val();
        var monthlyBudget = $("#monthlyBudgets").val();
        var lyLastYearCount = $("#lyLastYearCounts").val();
        var lyMonthlyBudget = $("#lyMonthlyBudgets").val();
        var fzLastYearCount = $("#fzLastYearCounts").val();
        var fzMonthlyBudget = $("#fzMonthlyBudgets").val();
        var wyfLastYearCount = $("#wyfLastYearCounts").val();
        var wyfMonthlyBudget = $("#wyfMonthlyBudgets").val();
        var qtsrLastYearCount = $("#qtsrLastYearCounts").val();
        var qtsrMonthlyBudget = $("#qtsrMonthlyBudgets").val();
        var bdfyLastYearCount = $("#bdfyLastYearCounts").val();
        var bdfyMonthlyBudget = $("#bdfyMonthlyBudgets").val();
        var kfsrxjLastYearCount = $("#kfsrxjLastYearCounts").val();
        var kfsrxjMonthlyBudget = $("#kfsrxjMonthlyBudgets").val();
        var cysrLastYearCount = $("#cysrLastYearCounts").val();
        var cysrMonthlyBudget = $("#cysrMonthlyBudgets").val();
        var czhjLastYearCount = $("#czhjLastYearCounts").val();
        var czhjMonthlyBudget = $("#czhjMonthlyBudgets").val();
        var lrLastYearCount = $("#lrLastYearCounts").val();
        var lrMonthlyBudget = $("#lrMonthlyBudgets").val();
        var gdfyLastYearCount = $("#gdfyLastYearCounts").val();
        var gdfyMonthlyBudget = $("#gdfyMonthlyBudgets").val();
        var rlcbLastYearCount = $("#rlcbLastYearCounts").val();
        var rlcbMonthlyBudget = $("#rlcbMonthlyBudgets").val();
        var sdqnhLastYearCount = $("#sdqnhLastYearCounts").val();
        var sdqnhMonthlyBudget = $("#sdqnhMonthlyBudgets").val();

        if ($("#type").val() == "bb" || $("#type").val() == "cz" || $("#type").val() == "bbcy" || $("#type").val() == "ly") {
            $("#unique").append("<div class=\"form-group\">\n" +
                "            <div class=\"col-sm-12\">\n" +
                "                <div class=\"col-sm-6\">\n" +
                "                    <label class=\"col-sm-4 control-label\">营业总收入：</label>\n" +
                "                    <div class=\"col-sm-8\">\n" +
                "                        <input class=\"form-control\" type=\"number\" id=\"lastYearCount\" name=\"lastYearCount\"\n" +
                "                           value='" + lastYearCount + "'    placeholder=\"请输入上年同期月累计\" required/>\n" +
                "                    </div>\n" +
                "                </div>\n" +
                "                <div class=\"col-sm-6\">\n" +
                "                    <label class=\"col-sm-4 control-label\">营业总收入：</label>\n" +
                "                    <div class=\"col-sm-8\">\n" +
                "                        <input class=\"form-control\" type=\"number\" id=\"monthlyBudget\" name=\"monthlyBudget\"\n" +
                "                            value='" + monthlyBudget + "'   placeholder=\"请输入月度预算\" required/>\n" +
                "                    </div>\n" +
                "                </div>\n" +
                "            </div>\n" +
                "        </div>" +
                "<div class=\"form-group\">\n" +
                "            <div class=\"col-sm-12\">\n" +
                "                <div class=\"col-sm-6\">\n" +
                "                    <label class=\"col-sm-4 control-label\">联营：</label>\n" +
                "                    <div class=\"col-sm-8\">\n" +
                "                        <input class=\"form-control\" type=\"number\" id=\"lyLastYearCount\" name=\"lyLastYearCount\"\n" +
                "                           value='" + lyLastYearCount + "'    placeholder=\"请输入上年同期月累计\" required/>\n" +
                "                    </div>\n" +
                "                </div>\n" +
                "                <div class=\"col-sm-6\">\n" +
                "                    <label class=\"col-sm-4 control-label\">联营：</label>\n" +
                "                    <div class=\"col-sm-8\">\n" +
                "                        <input class=\"form-control\" type=\"number\" id=\"lyMonthlyBudget\" name=\"lyMonthlyBudget\"\n" +
                "                           value='" + lyMonthlyBudget + "'    placeholder=\"请输入月度预算\" required/>\n" +
                "                    </div>\n" +
                "                </div>\n" +
                "            </div>\n" +
                "        </div>" +
                "<div class=\"form-group\">\n" +
                "            <div class=\"col-sm-12\">\n" +
                "                <div class=\"col-sm-6\">\n" +
                "                    <label class=\"col-sm-4 control-label\">房租：</label>\n" +
                "                    <div class=\"col-sm-8\">\n" +
                "                        <input class=\"form-control\" type=\"number\" id=\"fzLastYearCount\" name=\"fzLastYearCount\"\n" +
                "                         value='" + fzLastYearCount + "'      placeholder=\"请输入上年同期月累计\" required/>\n" +
                "                    </div>\n" +
                "                </div>\n" +
                "                <div class=\"col-sm-6\">\n" +
                "                    <label class=\"col-sm-4 control-label\">房租：</label>\n" +
                "                    <div class=\"col-sm-8\">\n" +
                "                        <input class=\"form-control\" type=\"number\" id=\"fzMonthlyBudget\" name=\"fzMonthlyBudget\"\n" +
                "                         value='" + fzMonthlyBudget + "'      placeholder=\"请输入月度预算\" required/>\n" +
                "                    </div>\n" +
                "                </div>\n" +
                "            </div>\n" +
                "        </div>" +
                "<div class=\"form-group\">\n" +
                "            <div class=\"col-sm-12\">\n" +
                "                <div class=\"col-sm-6\">\n" +
                "                    <label class=\"col-sm-4 control-label\">物业费：</label>\n" +
                "                    <div class=\"col-sm-8\">\n" +
                "                        <input class=\"form-control\" type=\"number\" id=\"wyfLastYearCount\" name=\"wyfLastYearCount\"\n" +
                "                           value='" + wyfLastYearCount + "'    placeholder=\"请输入上年同期月累计\" required/>\n" +
                "                    </div>\n" +
                "                </div>\n" +
                "                <div class=\"col-sm-6\">\n" +
                "                    <label class=\"col-sm-4 control-label\">物业费：</label>\n" +
                "                    <div class=\"col-sm-8\">\n" +
                "                        <input class=\"form-control\" type=\"number\" id=\"wyfMonthlyBudget\" name=\"wyfMonthlyBudget\"\n" +
                "                         value='" + wyfMonthlyBudget + "'      placeholder=\"请输入月度预算\" required/>\n" +
                "                    </div>\n" +
                "                </div>\n" +
                "            </div>\n" +
                "        </div>" +
                "<div class=\"form-group\">\n" +
                "            <div class=\"col-sm-12\">\n" +
                "                <div class=\"col-sm-6\">\n" +
                "                    <label class=\"col-sm-4 control-label\">其他收入：</label>\n" +
                "                    <div class=\"col-sm-8\">\n" +
                "                        <input class=\"form-control\" type=\"number\" id=\"qtsrLastYearCount\" name=\"qtsrLastYearCount\"\n" +
                "                         value='" + qtsrLastYearCount + "'      placeholder=\"请输入上年同期月累计\" required/>\n" +
                "                    </div>\n" +
                "                </div>\n" +
                "                <div class=\"col-sm-6\">\n" +
                "                    <label class=\"col-sm-4 control-label\">其他收入：</label>\n" +
                "                    <div class=\"col-sm-8\">\n" +
                "                        <input class=\"form-control\" type=\"number\" id=\"qtsrMonthlyBudget\" name=\"qtsrMonthlyBudget\"\n" +
                "                          value='" + qtsrMonthlyBudget + "'     placeholder=\"请输入月度预算\" required/>\n" +
                "                    </div>\n" +
                "                </div>\n" +
                "            </div>\n" +
                "        </div>" +
                "<div class=\"form-group\">\n" +
                "            <div class=\"col-sm-12\">\n" +
                "                <div class=\"col-sm-6\">\n" +
                "                    <label class=\"col-sm-4 control-label\">固定费用：</label>\n" +
                "                    <div class=\"col-sm-8\">\n" +
                "                        <input class=\"form-control\" type=\"number\" id=\"rlcbLastYearCount\" name=\"rlcbLastYearCount\"\n" +
                "                           value='" + rlcbLastYearCount + "'    placeholder=\"请输入上年同期月累计\" required/>\n" +
                "                    </div>\n" +
                "                </div>\n" +
                "                <div class=\"col-sm-6\">\n" +
                "                    <label class=\"col-sm-4 control-label\">固定费用：</label>\n" +
                "                    <div class=\"col-sm-8\">\n" +
                "                        <input class=\"form-control\" type=\"number\" id=\"gdfyMonthlyBudget\" name=\"gdfyMonthlyBudget\"\n" +
                "                          value='" + gdfyMonthlyBudget + "'     placeholder=\"请输入月度预算\" required/>\n" +
                "                    </div>\n" +
                "                </div>\n" +
                "            </div>\n" +
                "        </div>" +
                "<div class=\"form-group\">\n" +
                "            <div class=\"col-sm-12\">\n" +
                "                <div class=\"col-sm-6\">\n" +
                "                    <label class=\"col-sm-4 control-label\">人力成本：</label>\n" +
                "                    <div class=\"col-sm-8\">\n" +
                "                        <input class=\"form-control\" type=\"number\" id=\"rlcbLastYearCount\" name=\"rlcbLastYearCount\"\n" +
                "                           value='" + rlcbLastYearCount + "'    placeholder=\"请输入上年同期月累计\" required/>\n" +
                "                    </div>\n" +
                "                </div>\n" +
                "                <div class=\"col-sm-6\">\n" +
                "                    <label class=\"col-sm-4 control-label\">人力成本：</label>\n" +
                "                    <div class=\"col-sm-8\">\n" +
                "                        <input class=\"form-control\" type=\"number\" id=\"rlcbMonthlyBudget\" name=\"rlcbMonthlyBudget\"\n" +
                "                          value='" + rlcbMonthlyBudget + "'     placeholder=\"请输入月度预算\" required/>\n" +
                "                    </div>\n" +
                "                </div>\n" +
                "            </div>\n" +
                "        </div>" +
                "<div class=\"form-group\">\n" +
                "            <div class=\"col-sm-12\">\n" +
                "                <div class=\"col-sm-6\">\n" +
                "                    <label class=\"col-sm-4 control-label\">变动费用：</label>\n" +
                "                    <div class=\"col-sm-8\">\n" +
                "                        <input class=\"form-control\" type=\"number\" id=\"bdfyLastYearCount\" name=\"bdfyLastYearCount\"\n" +
                "                           value='" + bdfyLastYearCount + "'    placeholder=\"请输入上年同期月累计\" required/>\n" +
                "                    </div>\n" +
                "                </div>\n" +
                "                <div class=\"col-sm-6\">\n" +
                "                    <label class=\"col-sm-4 control-label\">变动费用：</label>\n" +
                "                    <div class=\"col-sm-8\">\n" +
                "                        <input class=\"form-control\" type=\"number\" id=\"bdfyMonthlyBudget\" name=\"bdfyMonthlyBudget\"\n" +
                "                           value='" + bdfyMonthlyBudget + "'    placeholder=\"请输入月度预算\" required/>\n" +
                "                    </div>\n" +
                "                </div>\n" +
                "            </div>\n" +
                "        </div>" +
                "<div class=\"form-group\">\n" +
                "            <div class=\"col-sm-12\">\n" +
                "                <div class=\"col-sm-6\">\n" +
                "                    <label class=\"col-sm-4 control-label\">水电气能耗：</label>\n" +
                "                    <div class=\"col-sm-8\">\n" +
                "                        <input class=\"form-control\" type=\"number\" id=\"sdqnhLastYearCount\" name=\"sdqnhLastYearCount\"\n" +
                "                           value='" + sdqnhLastYearCount + "'    placeholder=\"请输入上年同期月累计\" required/>\n" +
                "                    </div>\n" +
                "                </div>\n" +
                "                <div class=\"col-sm-6\">\n" +
                "                    <label class=\"col-sm-4 control-label\">水电气能耗：</label>\n" +
                "                    <div class=\"col-sm-8\">\n" +
                "                        <input class=\"form-control\" type=\"number\" id=\"sdqnhMonthlyBudget\" name=\"sdqnhMonthlyBudget\"\n" +
                "                          value='" + sdqnhMonthlyBudget + "'     placeholder=\"请输入月度预算\" required/>\n" +
                "                    </div>\n" +
                "                </div>\n" +
                "            </div>\n" +
                "        </div>" +
                "<div class=\"form-group\">\n" +
                "            <div class=\"col-sm-12\">\n" +
                "                <div class=\"col-sm-6\">\n" +
                "                    <label class=\"col-sm-4 control-label\">利润：</label>\n" +
                "                    <div class=\"col-sm-8\">\n" +
                "                        <input class=\"form-control\" type=\"number\" id=\"lrLastYearCount\" name=\"lrLastYearCount\"\n" +
                "                          value='" + lrLastYearCount + "'     placeholder=\"请输入上年同期月累计\" required/>\n" +
                "                    </div>\n" +
                "                </div>\n" +
                "                <div class=\"col-sm-6\">\n" +
                "                    <label class=\"col-sm-4 control-label\">利润：</label>\n" +
                "                    <div class=\"col-sm-8\">\n" +
                "                        <input class=\"form-control\" type=\"number\" id=\"lrMonthlyBudget\" name=\"lrMonthlyBudget\"\n" +
                "                           value='" + lrMonthlyBudget + "'    placeholder=\"请输入月度预算\" required/>\n" +
                "                    </div>\n" +
                "                </div>\n" +
                "            </div>\n" +
                "        </div>")
        }
        if ($("#type").val() == "ecological") {
            $("#unique").append("<div class=\"form-group\">\n" +
                "            <div class=\"col-sm-12\">\n" +
                "                <div class=\"col-sm-6\">\n" +
                "                    <label class=\"col-sm-4 control-label\">营业总收入：</label>\n" +
                "                    <div class=\"col-sm-8\">\n" +
                "                        <input class=\"form-control\" type=\"number\" id=\"lastYearCount\" name=\"lastYearCount\"\n" +
                "                          value='" + lastYearCount + "'     placeholder=\"请输入上年同期月累计\" required/>\n" +
                "                    </div>\n" +
                "                </div>\n" +
                "                <div class=\"col-sm-6\">\n" +
                "                    <label class=\"col-sm-4 control-label\">营业总收入：</label>\n" +
                "                    <div class=\"col-sm-8\">\n" +
                "                        <input class=\"form-control\" type=\"number\" id=\"monthlyBudget\" name=\"monthlyBudget\"\n" +
                "                            value='" + monthlyBudget + "'   placeholder=\"请输入月度预算\" required/>\n" +
                "                    </div>\n" +
                "                </div>\n" +
                "            </div>\n" +
                "        </div>" +
                "<div class=\"form-group\">\n" +
                "            <div class=\"col-sm-12\">\n" +
                "                <div class=\"col-sm-6\">\n" +
                "                    <label class=\"col-sm-4 control-label\">固定费用：</label>\n" +
                "                    <div class=\"col-sm-8\">\n" +
                "                        <input class=\"form-control\" type=\"number\" id=\"gdfyLastYearCount\" name=\"gdfyLastYearCount\"\n" +
                "                           value='" + gdfyLastYearCount + "'    placeholder=\"请输入上年同期月累计\" required/>\n" +
                "                    </div>\n" +
                "                </div>\n" +
                "                <div class=\"col-sm-6\">\n" +
                "                    <label class=\"col-sm-4 control-label\">固定费用：</label>\n" +
                "                    <div class=\"col-sm-8\">\n" +
                "                        <input class=\"form-control\" type=\"number\" id=\"gdfyMonthlyBudget\" name=\"gdfyMonthlyBudget\"\n" +
                "                           value='" + gdfyMonthlyBudget + "'    placeholder=\"请输入月度预算\" required/>\n" +
                "                    </div>\n" +
                "                </div>\n" +
                "            </div>\n" +
                "        </div>" +
                "<div class=\"form-group\">\n" +
                "            <div class=\"col-sm-12\">\n" +
                "                <div class=\"col-sm-6\">\n" +
                "                    <label class=\"col-sm-4 control-label\">人力成本：</label>\n" +
                "                    <div class=\"col-sm-8\">\n" +
                "                        <input class=\"form-control\" type=\"number\" id=\"rlcbLastYearCount\" name=\"rlcbLastYearCount\"\n" +
                "                           value='" + rlcbLastYearCount + "'    placeholder=\"请输入上年同期月累计\" required/>\n" +
                "                    </div>\n" +
                "                </div>\n" +
                "                <div class=\"col-sm-6\">\n" +
                "                    <label class=\"col-sm-4 control-label\">人力成本：</label>\n" +
                "                    <div class=\"col-sm-8\">\n" +
                "                        <input class=\"form-control\" type=\"number\" id=\"rlcbMonthlyBudget\" name=\"rlcbMonthlyBudget\"\n" +
                "                          value='" + rlcbMonthlyBudget + "'     placeholder=\"请输入月度预算\" required/>\n" +
                "                    </div>\n" +
                "                </div>\n" +
                "            </div>\n" +
                "        </div>" +
                "<div class=\"form-group\">\n" +
                "            <div class=\"col-sm-12\">\n" +
                "                <div class=\"col-sm-6\">\n" +
                "                    <label class=\"col-sm-4 control-label\">变动费用：</label>\n" +
                "                    <div class=\"col-sm-8\">\n" +
                "                        <input class=\"form-control\" type=\"number\" id=\"bdfyLastYearCount\" name=\"bdfyLastYearCount\"\n" +
                "                           value='" + bdfyLastYearCount + "'    placeholder=\"请输入上年同期月累计\" required/>\n" +
                "                    </div>\n" +
                "                </div>\n" +
                "                <div class=\"col-sm-6\">\n" +
                "                    <label class=\"col-sm-4 control-label\">变动费用：</label>\n" +
                "                    <div class=\"col-sm-8\">\n" +
                "                        <input class=\"form-control\" type=\"number\" id=\"bdfyMonthlyBudget\" name=\"bdfyMonthlyBudget\"\n" +
                "                           value='" + bdfyMonthlyBudget + "'    placeholder=\"请输入月度预算\" required/>\n" +
                "                    </div>\n" +
                "                </div>\n" +
                "            </div>\n" +
                "        </div>" +
                "<div class=\"form-group\">\n" +
                "            <div class=\"col-sm-12\">\n" +
                "                <div class=\"col-sm-6\">\n" +
                "                    <label class=\"col-sm-4 control-label\">水电气能耗：</label>\n" +
                "                    <div class=\"col-sm-8\">\n" +
                "                        <input class=\"form-control\" type=\"number\" id=\"rlcbLastYearCount\" name=\"sdqnhLastYearCount\"\n" +
                "                           value='" + sdqnhLastYearCount + "'    placeholder=\"请输入上年同期月累计\" required/>\n" +
                "                    </div>\n" +
                "                </div>\n" +
                "                <div class=\"col-sm-6\">\n" +
                "                    <label class=\"col-sm-4 control-label\">水电气能耗：</label>\n" +
                "                    <div class=\"col-sm-8\">\n" +
                "                        <input class=\"form-control\" type=\"number\" id=\"sdqnhMonthlyBudget\" name=\"sdqnhMonthlyBudget\"\n" +
                "                          value='" + sdqnhMonthlyBudget + "'     placeholder=\"请输入月度预算\" required/>\n" +
                "                    </div>\n" +
                "                </div>\n" +
                "            </div>\n" +
                "        </div>" +
                "<div class=\"form-group\">\n" +
                "            <div class=\"col-sm-12\">\n" +
                "                <div class=\"col-sm-6\">\n" +
                "                    <label class=\"col-sm-4 control-label\">利润：</label>\n" +
                "                    <div class=\"col-sm-8\">\n" +
                "                        <input class=\"form-control\" type=\"number\" id=\"lrLastYearCount\" name=\"lrLastYearCount\"\n" +
                "                           value='" + lrLastYearCount + "'    placeholder=\"请输入上年同期月累计\" required/>\n" +
                "                    </div>\n" +
                "                </div>\n" +
                "                <div class=\"col-sm-6\">\n" +
                "                    <label class=\"col-sm-4 control-label\">利润：</label>\n" +
                "                    <div class=\"col-sm-8\">\n" +
                "                        <input class=\"form-control\" type=\"number\" id=\"lrMonthlyBudget\" name=\"lrMonthlyBudget\"\n" +
                "                           value='" + lrMonthlyBudget + "'    placeholder=\"请输入月度预算\" required/>\n" +
                "                    </div>\n" +
                "                </div>\n" +
                "            </div>\n" +
                "        </div>");
        }
        if ($("#type").val() == "hotel") {
            $("#unique").append("<div class=\"form-group\">\n" +
                "            <div class=\"col-sm-12\">\n" +
                "                <div class=\"col-sm-6\">\n" +
                "                    <label class=\"col-sm-4 control-label\">营业总收入：</label>\n" +
                "                    <div class=\"col-sm-8\">\n" +
                "                        <input class=\"form-control\" type=\"number\" id=\"lastYearCount\" name=\"lastYearCount\"\n" +
                "                         value='" + lastYearCount + "'    placeholder=\"请输入上年同期月累计\" required/>\n" +
                "                    </div>\n" +
                "                </div>\n" +
                "                <div class=\"col-sm-6\">\n" +
                "                    <label class=\"col-sm-4 control-label\">营业总收入：</label>\n" +
                "                    <div class=\"col-sm-8\">\n" +
                "                        <input class=\"form-control\" type=\"number\" id=\"monthlyBudget\" name=\"monthlyBudget\"\n" +
                "                         value='" + monthlyBudget + "'      placeholder=\"请输入月度预算\" required/>\n" +
                "                    </div>\n" +
                "                </div>\n" +
                "            </div>\n" +
                "        </div>" +
                "<div class=\"form-group\">\n" +
                "            <div class=\"col-sm-12\">\n" +
                "                <div class=\"col-sm-6\">\n" +
                "                    <label class=\"col-sm-4 control-label\" style=\"white-space: nowrap;\">客房收入小计：</label>\n" +
                "                    <div class=\"col-sm-8\">\n" +
                "                        <input class=\"form-control\" type=\"number\" id=\"kfsrxjLastYearCount\" name=\"kfsrxjLastYearCount\"\n" +
                "                            value='" + kfsrxjLastYearCount + "'   placeholder=\"请输入上年同期月累计\" required/>\n" +
                "                    </div>\n" +
                "                </div>\n" +
                "                <div class=\"col-sm-6\">\n" +
                "                    <label class=\"col-sm-4 control-label\" style=\"white-space: nowrap;\">客房收入小计：</label>\n" +
                "                    <div class=\"col-sm-8\">\n" +
                "                        <input class=\"form-control\" type=\"number\" id=\"kfsrxjMonthlyBudget\" name=\"kfsrxjMonthlyBudget\"\n" +
                "                           value='" + kfsrxjMonthlyBudget + "'    placeholder=\"请输入月度预算\" required/>\n" +
                "                    </div>\n" +
                "                </div>\n" +
                "            </div>\n" +
                "        </div>" +
                "<div class=\"form-group\">\n" +
                "            <div class=\"col-sm-12\">\n" +
                "                <div class=\"col-sm-6\">\n" +
                "                    <label class=\"col-sm-4 control-label\">餐饮收入：</label>\n" +
                "                    <div class=\"col-sm-8\">\n" +
                "                        <input class=\"form-control\" type=\"number\" id=\"cysrLastYearCount\" name=\"cysrLastYearCount\"\n" +
                "                           value='" + cysrLastYearCount + "'    placeholder=\"请输入上年同期月累计\" required/>\n" +
                "                    </div>\n" +
                "                </div>\n" +
                "                <div class=\"col-sm-6\">\n" +
                "                    <label class=\"col-sm-4 control-label\">餐饮收入：</label>\n" +
                "                    <div class=\"col-sm-8\">\n" +
                "                        <input class=\"form-control\" type=\"number\" id=\"cysrMonthlyBudget\" name=\"cysrMonthlyBudget\"\n" +
                "                           value='" + cysrMonthlyBudget + "'    placeholder=\"请输入月度预算\" required/>\n" +
                "                    </div>\n" +
                "                </div>\n" +
                "            </div>\n" +
                "        </div>" +
                "<div class=\"form-group\">\n" +
                "            <div class=\"col-sm-12\">\n" +
                "                <div class=\"col-sm-6\">\n" +
                "                    <label class=\"col-sm-4 control-label\">固定费用：</label>\n" +
                "                    <div class=\"col-sm-8\">\n" +
                "                        <input class=\"form-control\" type=\"number\" id=\"gdfyLastYearCount\" name=\"gdfyLastYearCount\"\n" +
                "                          value='" + gdfyLastYearCount + "'     placeholder=\"请输入上年同期月累计\" required/>\n" +
                "                    </div>\n" +
                "                </div>\n" +
                "                <div class=\"col-sm-6\">\n" +
                "                    <label class=\"col-sm-4 control-label\">固定费用：</label>\n" +
                "                    <div class=\"col-sm-8\">\n" +
                "                        <input class=\"form-control\" type=\"number\" id=\"gdfyMonthlyBudget\" name=\"gdfyMonthlyBudget\"\n" +
                "                           value='" + gdfyMonthlyBudget + "'    placeholder=\"请输入月度预算\" required/>\n" +
                "                    </div>\n" +
                "                </div>\n" +
                "            </div>\n" +
                "        </div>" +
                "<div class=\"form-group\">\n" +
                "            <div class=\"col-sm-12\">\n" +
                "                <div class=\"col-sm-6\">\n" +
                "                    <label class=\"col-sm-4 control-label\">人力成本：</label>\n" +
                "                    <div class=\"col-sm-8\">\n" +
                "                        <input class=\"form-control\" type=\"number\" id=\"rlcbLastYearCount\" name=\"rlcbLastYearCount\"\n" +
                "                           value='" + rlcbLastYearCount + "'    placeholder=\"请输入上年同期月累计\" required/>\n" +
                "                    </div>\n" +
                "                </div>\n" +
                "                <div class=\"col-sm-6\">\n" +
                "                    <label class=\"col-sm-4 control-label\">人力成本：</label>\n" +
                "                    <div class=\"col-sm-8\">\n" +
                "                        <input class=\"form-control\" type=\"number\" id=\"rlcbMonthlyBudget\" name=\"rlcbMonthlyBudget\"\n" +
                "                          value='" + rlcbMonthlyBudget + "'     placeholder=\"请输入月度预算\" required/>\n" +
                "                    </div>\n" +
                "                </div>\n" +
                "            </div>\n" +
                "        </div>" +
                "<div class=\"form-group\">\n" +
                "            <div class=\"col-sm-12\">\n" +
                "                <div class=\"col-sm-6\">\n" +
                "                    <label class=\"col-sm-4 control-label\">变动费用：</label>\n" +
                "                    <div class=\"col-sm-8\">\n" +
                "                        <input class=\"form-control\" type=\"number\" id=\"bdfyLastYearCount\" name=\"bdfyLastYearCount\"\n" +
                "                          value='" + bdfyLastYearCount + "'     placeholder=\"请输入上年同期月累计\" required/>\n" +
                "                    </div>\n" +
                "                </div>\n" +
                "                <div class=\"col-sm-6\">\n" +
                "                    <label class=\"col-sm-4 control-label\">变动费用：</label>\n" +
                "                    <div class=\"col-sm-8\">\n" +
                "                        <input class=\"form-control\" type=\"number\" id=\"bdfyMonthlyBudget\" name=\"bdfyMonthlyBudget\"\n" +
                "                            value='" + bdfyMonthlyBudget + "'   placeholder=\"请输入月度预算\" required/>\n" +
                "                    </div>\n" +
                "                </div>\n" +
                "            </div>\n" +
                "        </div>" +
                "<div class=\"form-group\">\n" +
                "            <div class=\"col-sm-12\">\n" +
                "                <div class=\"col-sm-6\">\n" +
                "                    <label class=\"col-sm-4 control-label\">水电气能耗：</label>\n" +
                "                    <div class=\"col-sm-8\">\n" +
                "                        <input class=\"form-control\" type=\"number\" id=\"sdqnhLastYearCount\" name=\"sdqnhLastYearCount\"\n" +
                "                           value='" + sdqnhLastYearCount + "'    placeholder=\"请输入上年同期月累计\" required/>\n" +
                "                    </div>\n" +
                "                </div>\n" +
                "                <div class=\"col-sm-6\">\n" +
                "                    <label class=\"col-sm-4 control-label\">水电气能耗：</label>\n" +
                "                    <div class=\"col-sm-8\">\n" +
                "                        <input class=\"form-control\" type=\"number\" id=\"sdqnhMonthlyBudget\" name=\"sdqnhMonthlyBudget\"\n" +
                "                          value='" + sdqnhMonthlyBudget + "'     placeholder=\"请输入月度预算\" required/>\n" +
                "                    </div>\n" +
                "                </div>\n" +
                "            </div>\n" +
                "        </div>" +
                "<div class=\"form-group\">\n" +
                "            <div class=\"col-sm-12\">\n" +
                "                <div class=\"col-sm-6\">\n" +
                "                    <label class=\"col-sm-4 control-label\">利润：</label>\n" +
                "                    <div class=\"col-sm-8\">\n" +
                "                        <input class=\"form-control\" type=\"number\" id=\"lrLastYearCount\" name=\"lrLastYearCount\"\n" +
                "                           value='" + lrLastYearCount + "'    placeholder=\"请输入上年同期月累计\" required/>\n" +
                "                    </div>\n" +
                "                </div>\n" +
                "                <div class=\"col-sm-6\">\n" +
                "                    <label class=\"col-sm-4 control-label\">利润：</label>\n" +
                "                    <div class=\"col-sm-8\">\n" +
                "                        <input class=\"form-control\" type=\"number\" id=\"lrMonthlyBudget\" name=\"lrMonthlyBudget\"\n" +
                "                           value='" + lrMonthlyBudget + "'    placeholder=\"请输入月度预算\" required/>\n" +
                "                    </div>\n" +
                "                </div>\n" +
                "            </div>\n" +
                "        </div>");
        }
        if ($("#type").val() == "headquarters") {
            $("#unique").append("<div class=\"form-group\">\n" +
                "            <div class=\"col-sm-12\">\n" +
                "                <div class=\"col-sm-6\">\n" +
                "                    <label class=\"col-sm-4 control-label\">产值合计：</label>\n" +
                "                    <div class=\"col-sm-8\">\n" +
                "                        <input class=\"form-control\" type=\"number\" id=\"czhjLastYearCount\" name=\"czhjLastYearCount\"\n" +
                "                          value='" + czhjLastYearCount + "'     placeholder=\"请输入上年同期月累计\" required/>\n" +
                "                    </div>\n" +
                "                </div>\n" +
                "                <div class=\"col-sm-6\">\n" +
                "                    <label class=\"col-sm-4 control-label\">产值合计：</label>\n" +
                "                    <div class=\"col-sm-8\">\n" +
                "                        <input class=\"form-control\" type=\"number\" id=\"czhjMonthlyBudget\" name=\"czhjMonthlyBudget\"\n" +
                "                           value='" + czhjMonthlyBudget + "'    placeholder=\"请输入月度预算\" required/>\n" +
                "                    </div>\n" +
                "                </div>\n" +
                "            </div>\n" +
                "        </div>" +
                "<div class=\"form-group\">\n" +
                "            <div class=\"col-sm-12\">\n" +
                "                <div class=\"col-sm-6\">\n" +
                "                    <label class=\"col-sm-4 control-label\">固定费用：</label>\n" +
                "                    <div class=\"col-sm-8\">\n" +
                "                        <input class=\"form-control\" type=\"number\" id=\"gdfyLastYearCount\" name=\"gdfyLastYearCount\"\n" +
                "                          value='" + gdfyLastYearCount + "'     placeholder=\"请输入上年同期月累计\" required/>\n" +
                "                    </div>\n" +
                "                </div>\n" +
                "                <div class=\"col-sm-6\">\n" +
                "                    <label class=\"col-sm-4 control-label\">固定费用：</label>\n" +
                "                    <div class=\"col-sm-8\">\n" +
                "                        <input class=\"form-control\" type=\"number\" id=\"gdfyMonthlyBudget\" name=\"gdfyMonthlyBudget\"\n" +
                "                           value='" + gdfyMonthlyBudget + "'    placeholder=\"请输入月度预算\" required/>\n" +
                "                    </div>\n" +
                "                </div>\n" +
                "            </div>\n" +
                "        </div>" +
                "<div class=\"form-group\">\n" +
                "            <div class=\"col-sm-12\">\n" +
                "                <div class=\"col-sm-6\">\n" +
                "                    <label class=\"col-sm-4 control-label\">人力成本：</label>\n" +
                "                    <div class=\"col-sm-8\">\n" +
                "                        <input class=\"form-control\" type=\"number\" id=\"rlcbLastYearCount\" name=\"rlcbLastYearCount\"\n" +
                "                           value='" + rlcbLastYearCount + "'    placeholder=\"请输入上年同期月累计\" required/>\n" +
                "                    </div>\n" +
                "                </div>\n" +
                "                <div class=\"col-sm-6\">\n" +
                "                    <label class=\"col-sm-4 control-label\">人力成本：</label>\n" +
                "                    <div class=\"col-sm-8\">\n" +
                "                        <input class=\"form-control\" type=\"number\" id=\"rlcbMonthlyBudget\" name=\"rlcbMonthlyBudget\"\n" +
                "                          value='" + rlcbMonthlyBudget + "'     placeholder=\"请输入月度预算\" required/>\n" +
                "                    </div>\n" +
                "                </div>\n" +
                "            </div>\n" +
                "        </div>" +
                "<div class=\"form-group\">\n" +
                "            <div class=\"col-sm-12\">\n" +
                "                <div class=\"col-sm-6\">\n" +
                "                    <label class=\"col-sm-4 control-label\">变动费用：</label>\n" +
                "                    <div class=\"col-sm-8\">\n" +
                "                        <input class=\"form-control\" type=\"number\" id=\"bdfyLastYearCount\" name=\"bdfyLastYearCount\"\n" +
                "                           value='" + bdfyLastYearCount + "'    placeholder=\"请输入上年同期月累计\" required/>\n" +
                "                    </div>\n" +
                "                </div>\n" +
                "                <div class=\"col-sm-6\">\n" +
                "                    <label class=\"col-sm-4 control-label\">变动费用：</label>\n" +
                "                    <div class=\"col-sm-8\">\n" +
                "                        <input class=\"form-control\" type=\"number\" id=\"bdfyMonthlyBudget\" name=\"bdfyMonthlyBudget\"\n" +
                "                            value='" + bdfyMonthlyBudget + "'   placeholder=\"请输入月度预算\" required/>\n" +
                "                    </div>\n" +
                "                </div>\n" +
                "            </div>\n" +
                "        </div>" +
                "<div class=\"form-group\">\n" +
                "            <div class=\"col-sm-12\">\n" +
                "                <div class=\"col-sm-6\">\n" +
                "                    <label class=\"col-sm-4 control-label\">利润：</label>\n" +
                "                    <div class=\"col-sm-8\">\n" +
                "                        <input class=\"form-control\" type=\"number\" id=\"lrLastYearCount\" name=\"lrLastYearCount\"\n" +
                "                          value='" + lrLastYearCount + "'     placeholder=\"请输入上年同期月累计\" required/>\n" +
                "                    </div>\n" +
                "                </div>\n" +
                "                <div class=\"col-sm-6\">\n" +
                "                    <label class=\"col-sm-4 control-label\">利润：</label>\n" +
                "                    <div class=\"col-sm-8\">\n" +
                "                        <input class=\"form-control\" type=\"number\" id=\"lrMonthlyBudget\" name=\"lrMonthlyBudget\"\n" +
                "                            value='" + lrMonthlyBudget + "'   placeholder=\"请输入月度预算\" required/>\n" +
                "                    </div>\n" +
                "                </div>\n" +
                "            </div>\n" +
                "        </div>");
        }
    })

    function validform(formId) {
        return $(formId).validate()
    }

    function submitHandler() {

        if (validform("#form-budget-edit").form()) {
            if ($("#months").val() == "" || $("#years").val() == "") {
                alert("请检查单位、年份和月份是否选择!");
                return false;
            } else {
                var data = $("#form-budget-edit").serializeArray();
                $.operate.save(prefix + "/edit", data);
            }

        }
    }
</script>

</body>
</html>